import DashBoard from '_pages/Dashboard'
import ItemAdd from '_pages/ItemAdd'
import ItemList from '_pages/ItemList'
import ItemUpdate from '_pages/ItemUpdate'
import MsgList from '_pages/MsgList'
import Setting from '_pages/Setting'

const routes = [
  {
    path: '/admin/dashboard',
    name: '仪表盘',
    component: DashBoard,
    icon: 'icon-yibiaopan',
    meta: {
      isNav: true,
      roles: ['admin'],
      isDrop: false
    }
  },
  {
    path: '/admin/itemlist',
    name: '商品管理',
    component: ItemList,
    icon: 'icon-shangpinguanli',
    meta: {
      isNav: true,
      roles: ['admin'],
      isDrop: true
    }
  },
  {
    path: '/admin/itemadd',
    name: '增加商品',
    component: ItemAdd,
    icon: 'icon-shangpin',
    meta: {
      isNav: false,
      roles: ['admin'],
      isDrop: true
    }
  },
  {
    path: '/admin/itemupdate/:id',
    name: '商品修改',
    component: ItemUpdate,
    icon: 'icon-xiugai-copy',
    meta: {
      isNav: false,
      roles: ['admin'],
      isDrop: false
    }
  },
  {
    path: '/admin/msglist',
    name: '信息中心',
    component: MsgList,
    icon: 'icon-xiaoxizhongxin',
    meta: {
      isNav: true,
      roles: ['admin'],
      isDrop: false
    }
  },
  {
    path: '/admin/setting',
    name: '设置',
    component: Setting,
    icon: 'icon-shezhi',
    meta: {
      isNav: true,
      roles: ['superAdmin', 'admin'],
      isDrop: false
    }
  }
]

export default routes
